//
//  ZYAlertControl.h
//  XinJiangMall
//
//  Created by Tzyang on 2018/4/4.
//  Copyright © 2018年 Tzyang. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface ZYAlertControl : NSObject


/*! 弹出对话框
 *  @param title 标题
 *  @param msg 提示
 *  @param btnArray 按钮数组
 *  @param block 返回点击的按钮index,从0开始
 *  @param cancelString 取消按钮 文本
 */
+ (void) showAlertWithTitle:(NSString *)title
                    message:(NSString *)msg
           statementButtons:(NSArray <NSString *> *)btnArray
                handleBlock:(void (^)(NSUInteger btnIndex))block
       cancelButtonTitle:(NSString *)cancelString;

/*! 弹出对话框
 *  @param title 标题
 *  @param msg 提示
 *  @param block 返回点击的按钮index,从0开始
 *  @param cancelString 取消按钮
 *  @param destructiveButtonTitle 警示按钮
 *  @param otherButtonTitle 其他按钮
 */
+ (void) showActionSheetWithTitle:(NSString*)title
                          message:(NSString*)msg
                      chooseBlock:(void (^)(NSInteger buttonIdx))block
                cancelButtonTitle:(NSString*)cancelString
           destructiveButtonTitle:(NSString*)destructiveButtonTitle
                 otherButtonTitle:(NSString*)otherButtonTitle,...;

@end
